//
//  LeScene.h
//  Leste
//
//  Created by 王乐 on 2022/1/27.
//

#ifndef LeScene_hpp
#define LeScene_hpp

#include "LeGameObjectManager.h"

class LeScene
{
public:
    static LeScene* getInstance();

private:
    LeScene();
    LeScene(const LeScene&);
    static LeScene* instance;
    
public:
    void Initialize();  // Initialize gameobjects
    
    void Awake();       // Before gameloop, right after GameOjbect initialized.
    void PreRender();   // Before gameLoop.
    void Start();       // Before gameloop.
    void RenderSelection(); // In GameLoop.
    void UpdateCurMouseHoverID();
    void Update();      // In gameloop.
    void PostWorldStep();//In gameloop.
    void FixedUpdate(); // In gameloop.
    void Render();      // In gameloop.
    void PostRender();  // After gameloop.

    void PostprocessingSetup();

    // Add and Initialize gameobject. Initilize(), Awake(), PreRender(), Start() also happen here.
    void addGameObject(LeGameObject* newobj);

    void addGameObjIDtoDestroy(unsigned int ID);
    void DestroyGameObjectsByIDs();

    unsigned int getCurMouseHoverID();
    
private:
    LeGameObjectManager m_GameObjectManager;
};

#endif /* LeScene_hpp */
